package com.atguigu.lease.web.admin.service;

import com.atguigu.lease.model.entity.SystemUser;
import com.atguigu.lease.model.enums.BaseStatus;
import com.atguigu.lease.web.admin.vo.system.user.SystemUserItemVo;
import com.atguigu.lease.web.admin.vo.system.user.SystemUserQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author liubo
* @description 针对表【system_user(员工信息表)】的数据库操作Service
* @createDate 2023-07-24 15:48:00
*/
public interface SystemUserService extends IService<SystemUser> {

    /**
     * 根据条件分页查询员工信息
     * @param systemUserItemVoPage
     * @param queryVo
     * @return
     */
    IPage<SystemUserItemVo> pageQuerySystemUserItemVo(Page<SystemUserItemVo> systemUserItemVoPage, SystemUserQueryVo queryVo);

    /**
     * 判断用户名是否可用
     * @param username
     * @return
     */
    Boolean isUsernameExists(String username);

    /**
     * 根据id修改员工状态
     * @param id
     * @param status
     */
    void updateStatusById(Long id, BaseStatus status);

    SystemUserItemVo getUserItemVoById(Long id);

    /**
     * 保存或更新员工信息
     * @param systemUser
     */
    void saveOrUpdateSystemUser(SystemUser systemUser);
}
